//模版管理-模版列表-配置文件
App.util.ns('Admin.Template.Message');
Admin.Template.Message.Conf = {
    columns: [
        {name: '用户ID', value: 'user_ids'},
        {name: '参数一', width: '80px', value: 'parameter_one'},
        {name: '参数二', width: '80px', value: 'parameter_two'},
        {name: '参数三', width: '80px', value: 'parameter_three'},
        {name: '参数四', width: '80px', value: 'parameter_four'},
        {name: '参数五', width: '80px', value: 'parameter_five'},
        {name: '参数六', width: '80px', value: 'parameter_six'},
        {name: '参数七', width: '80px', value: 'parameter_seven'},
        {name: '跳转链接', width: '80px', value: 'page'},
        {name: '模版类型', width: '90px', value: function(item){
            switch (item.type+'') {
                case '0':
                    return '商品降价通知';
            }
        }},
        {name: '是否发送', width: '80px', value: function(item){
            switch (item.status+'') {
                case '0':
                    return '未发送';
                case '1':
                    return '已发送';
            }
        }},
        {name: '创建日期', width: '80px', value: function(item){
            return App.util.formator.date(item.created_at);
        }}
    ],
    form: [
        {type: 'hidden', name: 'id'},
        {type: 'input', name: 'parameter_one', title: '参数一', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'parameter_two', title: '参数二', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'parameter_three', title: '参数三', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'parameter_four', title: '参数四', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'parameter_five', title: '参数五', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'parameter_six', title: '参数六', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'parameter_seven', title: '参数七', maxLength: 50, rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'page', title: '跳转链接', rule: {
            type: 'str'
        }},
        {type: 'radio', name: 'type', title: '模版类型',
            items: [
                ['0', '商品降价通知'],
            ],
            defaults: '0'
        }
    ]
};